package eu.dominicum.ft.pd;

import eu.dominicum.ft.pd.mao.MakeCountryMAO;

/**
 * Country.
 *
 * @author Harry Klerks
 * @since 2013M1
 */
public class Country extends PersistentDomainObject {

    /**
     * ISO 3166 2 character country code.
     */
    private String countryCode;

    /**
     * Country name.
     */
    private String name;

    /**
     * Make a Country object.
     *
     * @param makeCountryMAO -
     * @return Country
     */
    protected static Country make(final MakeCountryMAO makeCountryMAO) {

        Country newCountry = new Country();

        newCountry.name = makeCountryMAO.getName();
        newCountry.countryCode = makeCountryMAO.getCountryCode();

        return newCountry;
    }

    /**
     * Protected constructor to satisfy JPA based object stores.
     */
    protected Country() {

    }

    /**
     * .
     *
     * @return String
     */
    public final String getCountryCode() {
        return countryCode;
    }

    /**
     * .
     *
     * @return String
     */
    public final String getName() {
        return name;
    }

}
